package com.nut.service.impl;

import com.nut.entity.Admin;
import com.nut.mapper.AdminMapper;
import com.nut.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-04-22 20:19
 * @ Description : 管理员实现类
 */

@Service
public class AdminServiceImpl implements AdminService
{
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin login(Admin admin)
    {
        return adminMapper.query(admin);
    }

    @Override
    public void registerAdmin(Admin admin)
    {
        adminMapper.add(admin);
    }
}
